import request from '@/utils/request'

export function selectBook(data) {
    return request({
      url: '/word/select',
      method: 'post',
      data: data
    })
  }
//   新增 

export function saveBook(data) {
    return request({
      url: '/word/save',
      method: 'post',
      data: data
    })
  }

  // 查询本书可以借阅的线下读本情况

  export function selectUserBook(data) {
    return request({
      url: '/word-user/select',
      method: 'get',
      params: data
    })
  }

  // 借到的书
  
  export function iBorrow() {
    return request({
      url: '/word-user/iBorrow',
      method: 'get',
    })
  }

  // 借出的
  
    
  export function iLent() {
    return request({
      url: '/word-user/iLent',
      method: 'get',
    })
  }
  // 提供的
  
  export function iOffer() {
    return request({
      url: '/word-user/iOffer',
      method: 'get',
    })
  }
  // 提供书籍
  export function offer(data) {
    return request({
      url: '/word-user/offer',
      method: 'post',
      params:data
    })
  }

  
  // 确定借阅
  export function userBorrow(data) {
    return request({
      url: '/word-user/borrow',
      method: 'post',
      params:data
    })
  }
  // 还书
  
  export function returnWord(data) {
    return request({
      url: '/word-user/returnWord',
      method: 'post',
      params:data
    })
  }
  // 希望归还
  
  export function hopeReturn(data) {
    return request({
      url: '/word-user/hopeReturn',
      method: 'post',
      params:data
    })
  }
  